package turretbehavior 
{
	import org.flixel.FlxG;
	/**
	 * ...
	 * @author morgan
	 */
	public class TypeCyclingTurretBehavior extends TurretBehavior
	{
		public var pattern:Array;
		public var interval:Number;
		
		public function TypeCyclingTurretBehavior(interval:Number, pattern:Array) 
		{
			this.interval = interval;
			this.pattern = pattern;
		}
		
		override public function onUpdate(t:Turret):void
		{
			super.onUpdate(t);
			
			t.bulletType = pattern[Math.floor(t.behaviorTime / interval) % pattern.length];
		}
		
	}

}